import requests
import json

def send_single_sms(apikey, code, mobile):
    #发送单条短信
    url = "https://sms.yunpian.com/v2/sms/single_send.json"
    text = "****".format(code)


    res = requests.post(url, data={
        "apikey": apikey,
        "mobile": mobile,
        "text": text,
    })
    re_json = json.loads(res.text)
    return re_json


